package net.chenlin.dp.modules.base.manager.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import net.chenlin.dp.common.entity.Page;
import net.chenlin.dp.common.entity.Query;
import net.chenlin.dp.modules.base.dao.SysRenwuMapper;
import net.chenlin.dp.modules.base.entity.SysRenwuEntity;
import net.chenlin.dp.modules.base.manager.SysRenwuManager;

/**
 * 任务安排
 *
 * @author ZhouChenglin
 * @email yczclcn@163.com
 * @url www.chenlintech.com
 * @date 2018年12月15日 下午9:24:58
 */
@Component("sysRenwuManager")
public class SysRenwuManagerImpl implements SysRenwuManager {

	@Autowired
	private SysRenwuMapper sysRenwuMapper;
	

	@Override
	public List<SysRenwuEntity> listSysRenwu(Page<SysRenwuEntity> page, Query search) {
		return sysRenwuMapper.listForPage(page, search);
	}

	@Override
	public int saveSysRenwu(SysRenwuEntity sysRenwu) {
		return sysRenwuMapper.save(sysRenwu);
	}

	@Override
	public SysRenwuEntity getSysRenwuById(Long id) {
		SysRenwuEntity sysRenwu = sysRenwuMapper.getObjectById(id);
		return sysRenwu;
	}

	@Override
	public int updateSysRenwu(SysRenwuEntity sysRenwu) {
		return sysRenwuMapper.update(sysRenwu);
	}

	@Override
	public int batchRemove(Long[] id) {
		int count = sysRenwuMapper.batchRemove(id);
		return count;
	}
	
}
